package smilesnake.behavior_pattern.responsibilityChainModel;

import smilesnake.interceptor.InterceptorJdkProxy;
import smilesnake.structural_model.proxy.HelloWorld;
import smilesnake.structural_model.proxy.impl.HelloWorldImpl;
/**
 * 责任链模式
 * @author smilesnake
 *
 */
public class ResponsibilityChainModel {
	public static void main(String[] args) {
		HelloWorld proxy1 = (HelloWorld) InterceptorJdkProxy.bind(new HelloWorldImpl(), "smilesnake.responsibilityChainModel.Interceptor1");  
		HelloWorld proxy2 = (HelloWorld) InterceptorJdkProxy.bind(proxy1, "smilesnake.responsibilityChainModel.Interceptor2");  
		HelloWorld proxy3 = (HelloWorld) InterceptorJdkProxy.bind(proxy2, "smilesnake.responsibilityChainModel.Interceptor3");  
		proxy3.sayHelloWorld();
	}
}
